import { request } from '@/utils/service'
import type * as Operation from '@/api/operation/types/operation'

export function SendMessage(data: Operation.SendMessageRequestData) {
  return request<Operation.SendMessageResponse>({
    url: '/sendMessage',
    method: 'post',
    data
  })
}
export function QueryMessage(data: Operation.QueryMessageRequestData) {
  return request<Operation.QueryMessageResponse>({
    url: '/queryMessage',
    method: 'post',
    data
  })
}
export function QueryFault(data: Operation.queryFaultRequestData) {
  return request<Operation.queryFaultResponse>({
    url: '/queryFault',
    method: 'post',
    data
  })
}
export function queryFaultMessage(data: Operation.queryFaultMessageRequestData) {
  return request<Operation.queryFaultMessageResponse>({
    url: '/queryFaultMessage',
    method: 'post',
    data
  })
}
export function renewFaultStatus(data: Operation.renewFaultStatusRequestData) {
  return request<Operation.renewFaultStatusResponse>({
    url: '/renewFaultStatus',
    method: 'post',
    data
  })
}
/** 获取工单列表 */
export function queryWorkOrder(data: Operation.queryWorkOrderRequestData) {
  return request<Operation.queryWorkOrderResponse>({
    url: '/queryWorkOrder',
    method: 'post',
    data
  })
}
/** 提交工单 */
export function submitWorkOrder(data: Operation.submitWorkOrderRequestData) {
  return request<Operation.submitWorkOrderResponse>({
    url: '/submitWorkOrder',
    method: 'post',
    data
  })
}
/** 备注工单 */
export function remarkWorkOrder(data: Operation.remarkWorkOrderRequestData) {
  return request<Operation.remarkWorkOrderResponse>({
    url: '/remarkWorkOrder',
    method: 'post',
    data
  })
}
/** 查询设备接单人 */
export function queryDeviceStaff(data: Operation.queryDeviceStaffRequestData) {
  return request<Operation.queryDeviceStaffResponse>({
    url: '/queryDeviceStaff',
    method: 'post',
    data
  })
}
/** 转派工单 */
export function transferWorkOrder(data: Operation.transferWorkOrderRequestData) {
  return request<Operation.transferWorkOrderResponse>({
    url: '/transferWorkOrder',
    method: 'post',
    data
  })
}
/** 取消工单 */
export function cancelWorkOrder(data: Operation.cancelWorkOrderRequestData) {
  return request<Operation.cancelWorkOrderResponse>({
    url: '/cancelWorkOrder',
    method: 'post',
    data
  })
}
/** 接取工单 */
export function acceptWorkOrder(data: Operation.acceptWorkOrderRequestData) {
  return request<Operation.acceptWorkOrderResponse>({
    url: '/acceptWorkOrder',
    method: 'post',
    data
  })
}
/** 完成工单 */

export function finishWorkOrder(data: Operation.finishWorkOrderRequestData) {
  return request<Operation.finishWorkOrderResponse>({
    url: '/finishWorkOrder',
    method: 'post',
    data
  })
}
/** 查询工单记录 */
export function queryWorkOrderLog(data: Operation.queryWorkOrderLogRequstData) {
  return request<Operation.queryWorkOrderLogResponse>({
    url: '/queryWorkOrderLog',
    method: 'post',
    data
  })
}
